#!/usr/bin/python3
# -*- coding: UTF-8 -*-


import sys

sys.path.append("../lib")
from inner_util import read_from_xlsx


SRC_FILE = sys.argv[1]

# 两壮两新
NAMES = ["卷烟及配套", "绿色钢铁", "新能源电池", "生物医药及医疗器械"]


def fix(val):
    return round(val / 10000, 1)


def main():
    data = read_from_xlsx(SRC_FILE)
    print(data[0][0])

    rows = [row for row in data if row[0] in NAMES]

    descs = [
        f"{r[0]}产业实现总产值{fix(r[4])}亿元，增加值{fix(r[8])}亿元；" for r in rows
    ]
    print("".join(descs))


if __name__ == "__main__":
    main()
